package cn.yuanqiao.archive.appManager.mapper;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author zjj
 * @date 2023/10/7
 */
public interface ArchiveMapper {

    List<Object> getDataDistinct(@Param("releField")String releField, @Param("ids")String ids, @Param("tableName") String tableName);

    int getSUMData(@Param("releField")String releField, @Param("ids")String ids, @Param("tableName") String tableName);

    int getCOUNTData(@Param("ids")String ids, @Param("tableName") String tableName);

    Map<String, Object> getArchiveDataById(@Param("column")String column, @Param("id")Long id, @Param("tableName") String tableName);

    int getCountByMap(@Param("data")Map<String, String> data, @Param("tableName") String tableName);

    Long getDeptIdByName(@Param("name")String name, @Param("tenantCode")String tenantCode);

    Long getUserIdByName(@Param("name")String name, @Param("tenantCode")String tenantCode);

    Long getDeptIdByOneId(@Param("oneId")String oneId, @Param("tenantCode")String tenantCode);

    Long getIdByMap(@Param("data")Map<String, String> data,@Param("tableName") String tableName);

    int updateStateByPackageId(@Param("state")int state,@Param("itemTableName") String itemTableName,@Param("onLineTableName") String onLineTableName,@Param("daType")Integer daType,@Param("onlineReceptionId")Long onlineReceptionId);

    void delArchiveByIdList(@Param("tableName")String tableName,@Param("ids") List<Long> ids);

    String getParentDept(Long deptId);

    Map<String,Object> getZT(@Param("name")String name,@Param("depts") String depts);

    String getMaxMjDoc(@Param("efileTableName")String efileTableName,@Param("daId") Long daId);

    Long getItemIdByXMBH(@Param("xmbh")String xmbh,@Param("tableName") String tableName);

    List<Map<String, Object>> getTableInfo(String tables);
}
